[NTG-context] Wiki - question about Command/ pages which start with a space character

2024-04-14 Thread garulfo
Command/ startxtable Command/ stoplinenote Command/ style Command/ synonym Command/ textbackground Command/ textnote Command/ tooltip Command/ type Command/ typebuffer Command/ unit ___ If your question is of interest to ot

[NTG-context] upload

2024-04-01 Thread Hans Hagen
When developing this Hans' Swedish improved a lot. {\language[sv] Den lilla del av befolkningen som handlar på IKEA och tittar på fåniga krimserier förstår kanske detta: \im {\sqrt {x + 1} = \sin(4 + y)}!} \stopbuffer \typebuffer[option=TEX] Which gives us the beautifully typeset: \startc

[NTG-context] Re: issue with typing in footnotes

2024-03-17 Thread Wolfgang Schuster
% \stopfoo \startbuffer yyy \stopbuffer \startfoo xxx \typebuffer zzz \stopfoo \stoptext end example Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist

[NTG-context] Re: How to input first n lines from file?

2023-12-16 Thread Henning Hraban Ramm
the rest of the lines. With \typebuffer you can define a "range", see https://wiki.contextgarden.net/Command/typebuffer But I guess you should write a Lua function that suits your use case. Hraban ___ If you

[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-22 Thread Hamid,Idris
box, which is at least something.. But how can we get the NBSP symbol that's alerady in the font? it's gone by that time ... the line break mmechanism uses glue, not characters Ok 3. Ideally: a. we want all Unicode control symbols to show up in verbatim or in \typebuffer (as in a text editor); o

[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-22 Thread Hans Hagen via ntg-context
xt 2. \enabletrackers[typesetters.nbsp] gives a colored box, which is at least something.. But how can we get the NBSP symbol that's alerady in the font? it's gone by that time ... the line break mmechanism uses glue, not characters 3. Ideally: a. we want all Unicode control symbols to show

[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-21 Thread Hamid,Idris
in the font? 3. Ideally: a. we want all Unicode control symbols to show up in verbatim or in \typebuffer (as in a text editor); b. we want all Unicode control symbols to be suppressed in final pdf output (for, e.g., printing). But some fonts meant for printing have symbols for Unicode control c

[NTG-context] Re: empty line before typebuffer

2023-07-31 Thread Henning Hraban Ramm
Am 31.07.23 um 17:25 schrieb Pablo Rodriguez: On 7/30/23 21:50, Henning Hraban Ramm wrote: Am 30.07.23 um 21:22 schrieb Wolfgang Schuster: Henning Hraban Ramm schrieb am 30.07.2023 um 21:14: Yet another issue: \typebuffer always starts with a blank line. Is this a bug, or how can I disable

[NTG-context] Re: empty line before typebuffer

2023-07-31 Thread Pablo Rodriguez
On 7/30/23 21:50, Henning Hraban Ramm wrote: > Am 30.07.23 um 21:22 schrieb Wolfgang Schuster: >> Henning Hraban Ramm schrieb am 30.07.2023 um 21:14: >>> Yet another issue: >>> >>> \typebuffer always starts with a blank line. >>> Is this a bug, or ho

[NTG-context] Re: empty line before typebuffer

2023-07-30 Thread Henning Hraban Ramm
Am 30.07.23 um 21:22 schrieb Wolfgang Schuster: Henning Hraban Ramm schrieb am 30.07.2023 um 21:14: Yet another issue: \typebuffer always starts with a blank line. Is this a bug, or how can I disable it? Hraban MWE: """ \starttext \startbuffer \samplefile{tufte} \stopbuff

[NTG-context] Re: empty line before typebuffer

2023-07-30 Thread Jacob Kauffmann via ntg-context
It comes from framedtext: \starttext \startbuffer \samplefile{tufte} \stopbuffer \framedtext[strut=no]{\typebuffer[option=tex]} \stoptext Best, Jacob > Am 30.07.2023 um 21:14 schrieb Henning Hraban Ramm : > > Yet another issue: > > \typebuffer always starts wi

[NTG-context] Re: empty line before typebuffer

2023-07-30 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 30.07.2023 um 21:14: Yet another issue: \typebuffer always starts with a blank line. Is this a bug, or how can I disable it? Hraban MWE: """ \starttext \startbuffer \samplefile{tufte} \stopbuffer \framedtext{\typebuffer[option=t

[NTG-context] empty line before typebuffer

2023-07-30 Thread Henning Hraban Ramm
Yet another issue: \typebuffer always starts with a blank line. Is this a bug, or how can I disable it? Hraban MWE: """ \starttext \startbuffer \samplefile{tufte} \stopbuffer \framedtext{\typebuffer[option=t

Re: [NTG-context] How to extend an existing macro to take optional parameters?

2023-03-14 Thread Bruce Horrocks via ntg-context
\def\mycommand#=#=#=#=#:[#5]% > {\ifparameter#1\or(1:#1)\fi > \ifparameter#2\or(2:#2)\fi > \ifparameter#3\or(3:#3)\fi > \ifparameter#4\or(4:#4)\fi > \ifparameter#5\or[5:#5]\fi} > > \startbuffer > \mycommand{aa}{bb}{cc} > \mycommand{aa}{bb}{cc}{dd} > \mycom

Re: [NTG-context] How to extend an existing macro to take optional parameters?

2023-03-13 Thread Hans Hagen via ntg-context
{aa}{bb}{cc} \mycommand{aa}{bb}{cc}{dd} \mycommand{aa}{bb}{cc}{dd}[ee] \stopbuffer \typebuffer \startlines \getbuffer \stoplines \stoptext I'm not saying that it's the best solution, you can add \protected in front of the \def if needed. Hans

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-28 Thread Kalouguine Andre via ntg-context
Hi Pablo, > \showframe > \setupinteraction[state=start] > \starttext > \startbuffer[abc] > def foo(x): > if x == 0: > bar() > else: > baz(x) > foo(x - 1) > \stopbuffer > \comment[location=leftmargin, > space=yes, > buffer=abc, > title={P

Re: [NTG-context] Subject: Leading spaces verbatim

2023-01-28 Thread Pablo Rodriguez via ntg-context
g your point with the following sample: \showframe \setupinteraction[state=start] \starttext \startbuffer[abc] def foo(x): if x == 0: bar() else: baz(x) foo(x - 1) \stopbuffer \comment[location=leftmargin, space=yes, buffer=abc, title={Python code}] {}\ty

[NTG-context] Spacing issue with \digits in math mode

2022-10-04 Thread Gavin via ntg-context
igits {12,345.67e89}$ 51 \setdigitmode {5} \setdigitorder{1} $\digits {12,345.67e89}$ 61 \setdigitmode {6} \setdigitorder{1} $\digits {12,345.67e89}$ \stopbuffer \typebuffer This is typeset as: \startlines \getbuffer \stoplines In text, the \type{\digits} command works fine: \setdigitmo

Re: [NTG-context] font fallbacks

2022-08-01 Thread Denis Maier via ntg-context
➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE > 9 U+0FFFD � REPLACEMENT CHARACTER > stop missing characters > start missing characters: cambriai.ttf > 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT > 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORN

Re: [NTG-context] font fallbacks

2022-08-01 Thread Henning Hraban Ramm via ntg-context
IT ONE    9  U+0FFFD  �  REPLACEMENT CHARACTER stop missing characters start missing characters: cambriai.ttf  266  U+0276C  ❬  MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT  266  U+0276D  ❭  MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT stop missing characters \stopbuffer \typebuffer[exampl

[NTG-context] font fallbacks

2022-07-30 Thread Henning Hraban Ramm via ntg-context
RIGHT-POINTING ANGLE BRACKET ORNAMENT stop missing characters \stopbuffer \typebuffer[example] \startlines \getbuffer[example] {\ss\getbuffer[example]} \stoplines \tex{abra}\arg{...} \type{kadabra} \type{~~~} \stoptext ""

Re: [NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror

2022-07-27 Thread Hans Hagen via ntg-context
}}} \quad + \quad {\PettyMatha=b^2 + \sqrt[3]{\frac{1}{x}}} \quad + \quad {\PatheticMath a=b^2 + \sqrt[3]{\frac{1}{x}}} \stopformula \stopbuffer \input tufte \getbuffer \input tufte \typebuffer \stoptext

Re: [NTG-context] Failing \doifemptyelse

2022-06-23 Thread Wolfgang Schuster via ntg-context
}{NO} \doifnothingelse{\empty}{YES}{NO} \stopbuffer \typebuffer \getbuffer \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http

Re: [NTG-context] Help needed with slide grid layout

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
value. When you use something like 2\measure{...} >> ConTeXt uses the "2" followed by the value of the measure, the following >> example demonstrates this in the second output. >> >> begin example >> \definemeasure [point] [1pt] >> >>

Re: [NTG-context] Help needed with slide grid layout

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
nTeXt uses the "2" followed by the value of the measure, the following > example demonstrates this in the second output. > > begin example > \definemeasure [point] [1pt] > > \starttext > > \startbuffer > \tex{measure}: \measure{point} > > \tex{measure

Re: [NTG-context] Help needed with slide grid layout

2022-05-25 Thread Wolfgang Schuster via ntg-context
{...} ConTeXt uses the "2" followed by the value of the measure, the following example demonstrates this in the second output. begin example \definemeasure [point] [1pt] \starttext \startbuffer \tex{measure}: \measure{point} \tex{measured}: \the\measured{point} \stopbuffer \

[NTG-context] redefining xmlsetups inside a XML document

2022-03-10 Thread mf via ntg-context
unction xml.functions.parseScript(s) local mimetype = s and s.at and s.at.type if mimetype and mimetype == "text/vnd.context" then lxml.context(s) end end function xml.functions.flushBody(b) local xmlsetups = b and b.at and b.at["data-xmlsetups"] if xmlsetups then lxml.t

Re: [NTG-context] How to make \def accept block or buffer as part of (long) command argument

2022-01-02 Thread Benjamin Buchmuller via ntg-context
} > > \let\stopMyCommand\relax > > \normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\expandtoken\notcatcodes92 > stopMyCommand}% > {\endgroup > % whatever #1 does > \setbuffer[foo]#2\endbuffer > \typebuffer[foo] > \getbuffer[foo]} > > or >

Re: [NTG-context] How to make \def accept block or buffer as part of (long) command argument

2022-01-02 Thread Hans Hagen via ntg-context
[#1]% {\begingroup \setcatcodetable\notcatcodes \dostartMyCommand[#1]} \let\stopMyCommand\relax \normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\expandtoken\notcatcodes92 stopMyCommand}% {\endgroup % whatever #1 does \setbuffer[foo]#2\endbuffer \typebuffer[foo] \getbuffer

[NTG-context] Blank lines discarded when \typing

2021-12-03 Thread Thangalin via ntg-context
{\typebuffer}: \typebuffer[javacode] \type{\typing}: \starttyping try { final var num = stack.pop(); if( num != null ) { stack.push( blah ); } return true; } \stoptyping \type{\typefile}: \typefile{t.java} \stoptext There appear to be two issues. First, \typefile produces what I'd

[NTG-context] getting sha512 from text in buffer

2021-12-01 Thread Pablo Rodriguez via ntg-context
Dear list, I have this minimal sample: \ctxlua{require("util-sha")} \def\sha#1{% \ctxlua{context(utilities.sha2.hash512("#1"))}} \startbuffer[text] hola \stopbuffer \starttext \sha{hola} \sha{\typebuffer[text]} \stoptext How can I get that both c

[NTG-context] io.loaddata() or buffer.assigns()

2021-09-08 Thread Thierry Horsin via ntg-context
Hi everybody Are there any type of files that is required by io.loaddata or/and buffers.assign ? The following code works pretty well if there is no compilation problem by g++. But it fails, i.e. \typebuffer[Mybuffer], does not produce anything if g++ fails (due to some errors in the cpp) I

Re: [NTG-context] getting line numbers

2021-09-04 Thread Thierry Horsin via ntg-context
Thank you Hans. For what I had in mind (compiling some c++ inside a tex file) it seems to work. Anyway for this I am currently using the buffer and typebuffer solution you provide. T. Le Saturday 04 Sep 2021 à 10:35:34 (+0200), Hans Hagen a écrit : > there has always been > > \the\in

Re: [NTG-context] getting line numbers

2021-09-04 Thread thierry horsin via ntg-context
rttext \startbuffer[MyBuffer] #include using namespace std; int mysum(int,int); int a; int b; int main () { a=2; b=9; cout << mysum(a,b) << endl; return 0; } int mysum(int a, int b) { return a+b; } \stopbuffer We compile and run: \typebuffer[MyBuffer][option=C] \startl

Re: [NTG-context] getting line numbers

2021-09-03 Thread Thierry Horsin via ntg-context
> int main () { > a=2; b=9; > cout << mysum(a,b) << endl; > return 0; > } > int mysum(int a, int b) { > return a+b; > } > \stopbuffer > > We compile and run: > > \typebuffer[MyBuffer][option=C] > > \startluacode > i

Re: [NTG-context] getting line numbers

2021-09-03 Thread Hans Hagen via ntg-context
t b; int main () { a=2; b=9; cout << mysum(a,b) << endl; return 0; } int mysum(int a, int b) { return a+b; } \stopbuffer We compile and run: \typebuffer[MyBuffer][option=C] \startluacode io.savedata("test.cpp",buffers.getcontent("MyBuffer")) --os.execute(&qu

Re: [NTG-context] line numbering restarts every page

2021-09-01 Thread Hans Hagen via ntg-context
simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. \stopbuffer \dorecurse{10}{ \samplefile{knuth} \typebuffer } \stoptex

[NTG-context] line numbering restarts every page

2021-09-01 Thread Henning Hraban Ramm via ntg-context
ri quam li existent Europan lingues. \stopbuffer \dorecurse{10}{ \samplefile{knuth} \typebuffer } \stoptext Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! mail

Re: [NTG-context] MetaPost Examples

2021-09-01 Thread Henning Hraban Ramm via ntg-context
(10cm, 0); >> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); >> \stopMPcode >> I’m quite sure there’s a possibility with buffers, but how? >> \startbuffer >> path p; >> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); >> draw brus

Re: [NTG-context] MetaPost Examples

2021-09-01 Thread Hans Hagen via ntg-context
; p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopbuffer \typebuffer ... and then how do I get the MP graphic? \processMPbuffer

[NTG-context] MetaPost Examples

2021-09-01 Thread Henning Hraban Ramm via ntg-context
(p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopbuffer \typebuffer ... and then how do I get the MP graphic? Hraban *) https://github.com/jemmybutton/fiziko ___ If your question is of interest to others as well

Re: [NTG-context] file to buffer

2021-08-17 Thread Hans Hagen via ntg-context
of the buffer. \starttext \startnointerference \samplefile{knuth} \stopnointerference \typebuffer[knuth] \getbuffer[knuth] \stoptext \starttext \ctxlua{buffers.assign( "hvdm-is-not-afraid-of-some-lua", io.loaddata(resolvers.findfile("tufte.tex")) )}

Re: [NTG-context] file to buffer

2021-08-17 Thread Wolfgang Schuster via ntg-context
} \stopnointerference \typebuffer[knuth] \getbuffer[knuth] \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl

Re: [NTG-context] How to check if buffer or block has content

2021-08-03 Thread Benjamin Buchmuller via ntg-context
tween that's even better). >> As an alternative solution, is there a way to add content to buffers? >> Unfortunately, I can't use \getbuffer[first,second], but >> \startbuffer[first][add=yes] … \stopbuffer would be nice. > just for fun I made this: > > \starttext >

Re: [NTG-context] How to check if buffer or block has content

2021-08-03 Thread Hans Hagen via ntg-context
fun I made this: \starttext \startbuffer[test] test \stopbuffer \startbuffer[oeps] oeps \stopbuffer \typebuffer[test] \getbuffer[test] \startbuffer[test = * + test] prepend \stopbuffer \typebuffer[test] \getbuffer[test] \startbuffer[test = test + *] append \stopbuffer \typeb

Re: [NTG-context] Side-by-side environment

2021-05-31 Thread Werner Hennrich
twidth,strut=no,offset=1ex,framecolor=black,rulethickness=0.5pt]   \startxrow [corner=03,align=normal]     \startxcell       \typebuffer [userdata] [option=tex]     \stopxcell   \stopxrow   \startxrow [corner=01,align=normal]     \startxcell       \getuserdata     \stopxcell

[NTG-context] Side-by-side environment

2021-05-31 Thread Tommaso Gordini
] [renderingsetup=userdata:example] \startsetups [userdata:example] \blank \startembeddedxtable [width=\textwidth,strut=no,offset=1ex,framecolor=black,rulethickness=0.5pt] \startxrow [corner=03,align=normal] \startxcell \typebuffer [userdata] [option=tex] \stopxcell

Re: [NTG-context] context() does not ignore space in empty line

2021-04-19 Thread Hans Hagen
n\n ) line 8.2\n\n') context.blank() context('line 9.1 (\n \n)line 9.2\n\n') context.blank() context('line 0.1 (\n \n \n) line 0.2\n\n') context.blank() \stopluacode \stopbuffer \typebuffer \getbuffer \stoptext now, the question is, does this cover all cases and is

[NTG-context] new font trickery

2020-12-22 Thread Hans Hagen
it but that is gained back because we load less fonts and have less glyph runs. It even works in math, although there some different trickery is needed. \typebuffer \stoptext - Hans

Re: [NTG-context] Setting and measuring boxes TeX/Lua

2020-11-27 Thread Jano Kula
measures) before they are needed. - When needed, use the reference to the buffer. Tests looked promising. After \starttext buffers and measures are known (both TeX & Lua). Also tested in functions, etc. But inside the first \xmlsetup, they are not expanded anymore, they are typeset (lik

Re: [NTG-context] lmtx

2020-10-30 Thread Jairo A. del Rio
as a trigger. Here are a few examples of usage: 162 163 \startbuffer 164 discrete---discrete 165 \stopbuffer 166 >> \typebuffer \startnarrower \dontcomplain \hsize 1pt \getbuffer \par \stopnarrower 167 \startbuffer 168 discrete\discretionary{}{}{---}discrete 169 \stop

Re: [NTG-context] Bug with lmtx and color in table

2020-07-22 Thread Wolfgang Schuster
from it. \starttext \startbuffer \vrule width 4cm height 4cm depth 0pt\relax \stopbuffer \typebuffer \getbuffer \startbuffer \hrule width 4cm height 4cm depth 0pt\relax \stopbuffer \typebuffer \getbuffer \startbuffer \frule width 4cm height 4cm type fill\relax \stopbuffer \typebuffer

Re: [NTG-context] Avoid indentation after \typebuffer

2020-07-01 Thread Hans Hagen
On 7/1/2020 12:25 PM, Mikael Sundqvist wrote: Does the indentnext do something else for this setup? I'll look at it Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH

Re: [NTG-context] Avoid indentation after \typebuffer

2020-07-01 Thread Mikael Sundqvist
On Wed, Jul 1, 2020 at 8:53 AM Hans Hagen wrote: > On 6/30/2020 9:50 PM, Mikael Sundqvist wrote: > > Hi, > > > > I want to avoid indentation after \typebuffer (or set indentnext to auto > > perhaps). I am probably missing something simple, but I thought that the &g

Re: [NTG-context] Avoid indentation after \typebuffer

2020-07-01 Thread Hans Hagen
On 6/30/2020 9:50 PM, Mikael Sundqvist wrote: Hi, I want to avoid indentation after \typebuffer (or set indentnext to auto perhaps). I am probably missing something simple, but I thought that the example file below should have worked: \setupindenting[yes,medium] \setuptyping[buffer

[NTG-context] Avoid indentation after \typebuffer

2020-06-30 Thread Mikael Sundqvist
Hi, I want to avoid indentation after \typebuffer (or set indentnext to auto perhaps). I am probably missing something simple, but I thought that the example file below should have worked: \setupindenting[yes,medium] \setuptyping[buffer][ indentnext=no, ] \starttext \startbuffer \startformula

Re: [NTG-context] changing alignment inside a paragraph

2019-12-10 Thread Wolfgang Schuster
1-104, 276, 345, 401–403. \stopbuffer \typebuffer \getbuffer \startbuffer \startalignment[end] This is the text of an index term, that is normally justified, but I'd like the page numbers to be flushed to the right from their second line 34, 57, 101-104, 276, 345, 401–403. \stopalignment \

Re: [NTG-context] ASCII mode within \footnote

2019-11-04 Thread Wolfgang Schuster
ter=\blank] \starttext Normal comment: \startbuffer     % comment \stopbuffer \typebuffer \getbuffer Comment in \type{asciimode} environment: \startbuffer     \startasciimode     % comment     \stopasciimode \stopbuffer \typebuffer \getbuffer Comment in the argument of a command: \s

Re: [NTG-context] interlaced overbrace and underbrace

2019-10-25 Thread Hans Hagen
} + e$\blank $a + \overbrace [lt=1em,rb=1em] {b+c+d} + e$\blank $a + \underbrace [lt=1em,rb=1em] {b+c+d} + e$\blank $a + \doublebrace[lt=-4em,rb=-4em]{b+c+d} + e$\blank \stopbuffer \typebuffer[option=TEX] \getbuffer \stoptext so, lt for lefttop etc Hans

Re: [NTG-context] new (lmtx) beta

2019-10-05 Thread Fabrice Couvreur
> ymin=-5, > ymax=5, > xstep=0.01, > ystep=0.01, > range={0}, > levels=1, > function="-15*x+2*x*y+5*x^4*y-10*x^2*y^3+y^5", > linecolor="orange", > linewidth=1, > legend=false, > cache=true, > ] xsized 10cm ; > \stopMPpage > > \st

Re: [NTG-context] new (lmtx) beta

2019-10-04 Thread Mikael P. Sundqvist
h=1, legend=false, cache=true, ] xsized 10cm ; \stopMPpage \startbuffer[mmainput] ContourPlot[ {-4+x^2+x^5+15y-y^2-10x^3y^2+5x*y^4 == 0, -15x+2x*y+5*x^4*y-10x^2*y^3+y^5 == 0}, {x, -5, 5}, {y, -5, 5}, Frame -> False] \stopbuffer \startTEXpage[offset=2bp] \typebuffer[mmainput] \externalfigure[ma

Re: [NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-01-31 Thread Weber, Matthias
; ) >> end >> \stopluacode >> \def\startappendbuffer[#1]% >> {\def\stopappendbuffer% >> {\ctxlua{userdata.addTempToBuffer('#1', [==[\getnumber[problem]]==])}} >>\dostartbuffer[APPENDTEMP][startappendbuffer][stopappendbuffer]} >> \

Re: [NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-01-31 Thread Wolfgang Schuster
[APPENDTEMP][startappendbuffer][stopappendbuffer]} \starttext \chapter{One} \startproblem{Test} Test problem \startappendbuffer[soln] Solution \stopappendbuffer \stopproblem \startproblem{Test} Test problem \startappendbuffer[soln] Solution \stopappendbuffer \stopproblem

[NTG-context] getting ConTeXt results back to Lua (for typesetting solutions at end of document)

2019-01-31 Thread Sanjoy Mahajan
[APPENDTEMP][startappendbuffer][stopappendbuffer]} \starttext \chapter{One} \startproblem{Test} Test problem \startappendbuffer[soln] Solution \stopappendbuffer \stopproblem \startproblem{Test} Test problem \startappendbuffer[soln] Solution \stopappendbuffer \stopproblem

Re: [NTG-context] A ConTeXt Guide in Italian

2018-12-02 Thread Wolfgang Schuster
]     \startxrow [corner=round,align=normal]       \startxcell         \typebuffer [userdata] [option=tex]       \stopxcell     \stopxrow   \stopembeddedxtable   \blank \stopsetups \startsetups [userdata:purecode] \blank \startframedtext [width=max,offset=1ex,corner=round,framecolor=black

Re: [NTG-context] Problems with setups module

2018-11-26 Thread Wolfgang Schuster
module? Thanks in advance Tommy \usemodule [setups] \starttext %\startbuffer %\framed [width=3cm,height=1cm] {testo} %\stopbuffer % %\typebuffer %\getbuffer \cmdfullsetup [setuppapersize] \stoptext

Re: [NTG-context] Problems with setups module

2018-11-26 Thread Tommaso Gordini
Sorry, the correct code is the following: \usemodule [setups] \starttext \startbuffer \framed [width=3cm,height=1cm] {testo} \stopbuffer \typebuffer \getbuffer \cmdfullsetup [setuppapersize] \startbuffer[foo] \framed [width=3cm,height=1cm] {testo} \stopbuffer \typebuffer[foo

[NTG-context] Problems with setups module

2018-11-26 Thread Tommaso Gordini
% %\typebuffer %\getbuffer \cmdfullsetup [setuppapersize] \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo

Re: [NTG-context] Subformula numbering

2018-11-26 Thread luigi scarso
ist. > Thanks in advance, > > \starttext \startbuffer \placeformula \startformula \startcases \NC 2 \NC $ y > 0 $ \NR \NC 7 \NC $ x = 7 $ \NR[+] \NC 4 \NC otherwise \NR \stopcases \stopformula \stopbuffer \typebuffer \getbuffer \startbuffer \placeformula \startformula x \startc

Re: [NTG-context] Which commands to use to show setups?

2018-11-25 Thread Wolfgang Schuster
other commands of this kind? \usemodule[setups] \starttext When you describe a command, e.g. \type{\startdescription{\cmdbasicsetup[...]} ... \stopdescription}: \startbuffer [basicsetup] \cmdbasicsetup [startxtable] \stopbuffer \typebuffer [basicsetup] \ge

Re: [NTG-context] Which commands to use to show setups?

2018-11-25 Thread Tommaso Gordini
to be used > > according to needs? > > > > Are there other commands of this kind? > > \usemodule[setups] > > \starttext > > When you describe a command, e.g. > \type{\startdescription{\cmdbasicsetup[...]} ... \stopdescription}: > > \startbuffer [basi

Re: [NTG-context] Which commands to use to show setups?

2018-11-24 Thread Wolfgang Schuster
{\startdescription{\cmdbasicsetup[...]} ... \stopdescription}: \startbuffer [basicsetup] \cmdbasicsetup [startxtable] \stopbuffer \typebuffer [basicsetup] \getbuffer  [basicsetup] When you show the syntax of a command without the options: \startbuffer [shortsetup] \cmdshortsetup [startxtable] \stopbuffer

Re: [NTG-context] A ConTeXt Guide in Italian

2018-11-21 Thread Wolfgang Schuster
examples in the document. \starttext \startbuffer \startframedtext \samplefile{klein} \stopframedtext \stopbuffer \typebuffer[option=tex] \getbuffer \stoptext You can use this to write your own environment for the examples (or use the userdata environment when you’re lazy :) \defineuserdata

Re: [NTG-context] Including part of a program source file

2018-04-21 Thread Alan Braslau
nition for the first command} > % cmd:one:end > > % cmd:two:begin > \define\SecondCommand >{\dosingleempty\doSecondCommand} > > \def\doSecondCommand[#1]% >{This is the definition for the second command} > % cmd:two:end > \stopbuffer > > \starttext > \typebu

Re: [NTG-context] Including part of a program source file

2018-04-21 Thread Wolfgang Schuster
\doFirstCommand[#1]% {This is the definition for the first command} % cmd:one:end % cmd:two:begin \define\SecondCommand {\dosingleempty\doSecondCommand} \def\doSecondCommand[#1]% {This is the definition for the second command} % cmd:two:end \stopbuffer \starttext \typebuffer[range={cmd:two:begin

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-17 Thread Aditya Mahajan
:-). \samplefile{ward} \startnarrower \samplefile{ward} \startbuffer[test] Leading spaces And some more \stopbuffer \typebuffer[test] \stopnarrower \samplefile{ward} \startbuffer[test] Leading spaces And some more \stopbuffer \typebuffer[test] it is actually

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-17 Thread Aditya Mahajan
\samplefile{ward} \startbuffer[test] Leading spaces And some more \stopbuffer \typebuffer[test] \stopnarrower \samplefile{ward} \startbuffer[test] Leading spaces And some more \stopbuffer \typebuffer[test] it is actually a feature to align the left edge relative

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-17 Thread Hans Hagen
] Leading spaces And some more \stopbuffer \typebuffer[test] \stopnarrower \samplefile{ward} \startbuffer[test] Leading spaces And some more \stopbuffer \typebuffer[test] it is actually a feature to align the left edge relative to the least indented so that we can use

Re: [NTG-context] \basegrid ignores color

2018-03-22 Thread Henri Menke
in a more modern way. %D %D \startbuffer %D \basegrid %D [nx=8,ny=5, %Ddx=.5,dy=.25, %Dunit=cm,scale=2,factor=1, %Doffset=1ex,xstep=2,ystep=1, %Dalign=middle,style=\tt\tx] %D \stopbuffer %D %D \typebuffer %D %D \placefigure %D {An example of a grid.} %D {\getbuffer} \startuseM

Re: [NTG-context] type and typing comments for TeX and Lua

2017-12-21 Thread Aditya Mahajan
\xmltempbuffername{xml-temp} \unexpanded\def\prettyprintbuffer#1#2% only used here {\ifdefined\scitebuffer \scitebuffer[#2][#1]% \else \typebuffer[#1][\c!option=#2]% \fi} %~ \unexpanded\def\xmlprettyprint#1#2% %~ {\xmltobufferverbose{#1}{.}{\xmltempbuffername

Re: [NTG-context] type and typing comments for TeX and Lua

2017-12-21 Thread Pablo Rodriguez
w: \def\xmltempbuffername{xml-temp} \unexpanded\def\prettyprintbuffer#1#2% only used here {\ifdefined\scitebuffer \scitebuffer[#2][#1]% \else \typebuffer[#1][\c!option=#2]% \fi} %~ \unexpanded\def\xmlprettyprint#1#2% %~ {\xmlto

Re: [NTG-context] issues with \scitebuffer and \sciteinlinebuffer

2017-09-05 Thread Hans Hagen
[typebuffer] | \ConTeXt\ \ConteXt \par \stopbuffer \starttext \scitebuffer[typebuffer] \scitebuffer[none][typebuffer] \letterbar a \sciteinlinebuffer[typebuffer]. b \stoptext And I’m experiencing the following issues: 1. "|" breaks compilation when met

[NTG-context] issues with \scitebuffer and \sciteinlinebuffer

2017-09-05 Thread Pablo Rodriguez
Hans, after updating to latest beta (from 2017.09.05 15:10) to enjoy the new none method in the scite buffers, I have the following sample: \setupindenting[yes, always, big] \usemodule[scite] \setuptyping[margin=2cm] \startbuffer[typebuffer] | \ConTeXt\ \ConteXt \par

Re: [NTG-context] source code and result side by side

2017-08-04 Thread Henning Hraban Ramm
width=0.5\textwidth, >>> align=normal, >>> ] >>> >>> \definebuffer >>> [CodeExample] >>> >>> \define\stopCodeExample >>> {\placesidebyside >>> {\CodeExampleFramed{\typeCodeExample}} >>> {\CodeExam

Re: [NTG-context] (again) \typebufferinline for XML inline code

2017-08-02 Thread Hans Hagen
inline code in XML. \startbuffer[foo] foo \bar{crap} \stopbuffer \starttext \typebuffer[foo] \stoptext Many thanks for your reply, Hans. I’m afraid this isn’t what I was looking for. i'll make \xmlinlineprettyprinttext but there is where this madness stops As shown in the following

Re: [NTG-context] (again) \typebufferinline for XML inline code

2017-08-01 Thread Pablo Rodriguez
nline and >> \xmlprettyprintinlinetext in order to handle inline code in XML. > > \startbuffer[foo] > foo \bar{crap} > \stopbuffer > > \starttext > \typebuffer[foo] > \stoptext Many thanks for your reply, Hans. I’m afraid this isn’t what I was looking for. As

Re: [NTG-context] (again) \typebufferinline for XML inline code

2017-08-01 Thread Hans Hagen
-ver.mkiv, but I’m afraid I cannot contribute such a patch. This is essential to have \xmlprettyprintinline and \xmlprettyprintinlinetext in order to handle inline code in XML. \startbuffer[foo] foo \bar{crap} \stopbuffer \starttext \typebuffer[foo] \stoptext

Re: [NTG-context] source code and result side by side

2017-07-30 Thread Aditya Mahajan
e wiki as ... i.e. sourcecode beside the result. Often the shown source is exactly what I want to show, in other cases I need some additional setup that I don’t want to show. Which approach would you suggest? Combinations? \startbuffer[example-1] \stopbuffer \placesidebyside {\type

Re: [NTG-context] source code and result side by side

2017-07-30 Thread Pablo Rodriguez
On 07/30/2017 07:13 PM, Henning Hraban Ramm wrote: > [...] > But I’d like to show a lot of similar examples to explain several options. > Therefore, if I’d like to simplify my code, but this doesn’t work: > > \def\CodeExample#1{% > \startbuffer[zB] > #1 > \sto

Re: [NTG-context] source code and result side by side

2017-07-30 Thread Henning Hraban Ramm
you suggest? Combinations? > > \startbuffer[example-1] > > \stopbuffer > > > \placesidebyside >{\typebuffer[example-1]} >{\getbuffer[setups, example-1]} Thank you again, that should be enough for most of my small examples. I guess I never heard of or forgot abou

Re: [NTG-context] ligatures/substituation at word boundaries

2017-07-30 Thread Hans Hagen
lookups = { 1 }, }, }, }, } \stopluacode \definefontfeature[test-a][test-a=yes] \startbuffer xxx abcd abxcd xxx \stopbuffer \starttext \typebuffer \definedfont[file:dejavu-serif.ttf*default] \getbuffer \blank \definedfont[file:dejavu-serif.ttf

Re: [NTG-context] ligatures/substituation at word boundaries

2017-07-30 Thread Ulrike Fischer
ot; }, { "d" } }, after = { { 0xFFFC, " " } }, lookups = { 1 }, }, }, }, } \stopluacode \definefontfeature[test-a][test-a=yes] \startbuffer xxx abcd abxcd xxx \stopbuffer \starttext \typebuffer \de

Re: [NTG-context] source code and result side by side

2017-07-29 Thread Pablo Rodriguez
On 07/29/2017 10:58 AM, Pablo Rodriguez wrote: > On 07/29/2017 12:57 AM, Aditya Mahajan wrote: >> [...] >> \placesidebyside >> {\typebuffer[example-1]} >> {\getbuffer[setups, example-1]} > [...] > Is there now hay to avoid the forced horizontal mode o

Re: [NTG-context] source code and result side by side

2017-07-29 Thread Pablo Rodriguez
On 07/29/2017 12:57 AM, Aditya Mahajan wrote: > [...] > \startbuffer[example-1] > > \stopbuffer > > > \placesidebyside > {\typebuffer[example-1]} > {\getbuffer[setups, example-1]} Many thanks for your suggestion, Aditya. I’m afraid everything is forc

Re: [NTG-context] source code and result side by side

2017-07-28 Thread Aditya Mahajan
some additional setup that I don’t want to show. Which approach would you suggest? Combinations? \startbuffer[example-1] \stopbuffer \placesidebyside {\typebuffer[example-1]} {\getbuffer[setups, example-1

Re: [NTG-context] ligatures/substituation at word boundaries

2017-07-28 Thread Hans Hagen
, ['2'] = { "c", "d" }, }, }, }, data = { rules = { { before = { { " " } }, current = { { "a" }, { "b" } }, look

[NTG-context] inline code in XML

2017-07-28 Thread Pablo Rodriguez
marking in code blocks and in inline code? I have tried to find out a solution, but \typebuffer requires a separate paragraph (or I didn’t know how to disable it). Many thanks for your help, Pablo -- http://www.ousia.tk

Re: [NTG-context] handling code in XML

2017-07-24 Thread Pablo Rodriguez
else > buffers.erase(name) > end > end > > \stopluacode > > \unprotect > > \unexpanded\def\xmlprettyprinttext#1#2% >{\ctxlua{lxml.tobufferX("#1",".","xml-temp")}% > \ifdefined\sci

Re: [NTG-context] handling code in XML

2017-07-24 Thread Hans Hagen
\stopluacode \unprotect \unexpanded\def\xmlprettyprinttext#1#2% {\ctxlua{lxml.tobufferX("#1",".","xml-temp")}% \ifdefined\scitebuffer \scitebuffer[#2][xml-temp]% \else \typebuffer[xml-temp][\c!option=#2]% \fi} \pro

Re: [NTG-context] overrule italics

2017-06-04 Thread Hans Hagen
\startbuffer \startbuffer[demo] \start \getbuffer[setup] \subject{[ {\myslanted myslanted} ] [ {\it it} ] [ {\slanted slanted} ] [ $x=1$ ]} [ {\myslanted myslanted} ] [ {\it it} ] [ {\slanted slanted} ] [ $x=1$ ] \typebuffer[setup] \blackrule[width

  1   2   3   >